package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Pattern;

/**
 * 客户实体类
 */
@Data
@ApiModel(value = "客户实体")
@TableName("t_customer")
public class CustomerBean {
    /**客户id*/
    @TableId(value = "pk_customerId" ,type = IdType.AUTO)
    private Integer customerId;
    /**客户名称*/
    @ApiModelProperty(value = "客户名称")
    @TableField("c_name")
    private String customerName;
    /**负责人*/
    @ApiModelProperty(value = "负责人")
    @TableField("c_headName")
    private String headName;
    /**负责人电话*/
    @ApiModelProperty(value = "负责人电话")
    @TableField("c_headPhone")
    private String headPhone;
    /**办公地址*/
    @ApiModelProperty(value = "办公地址")
    @TableField("c_address")
    private String address;
    /**经营范围*/
    @ApiModelProperty(value = "经营范围")
    @TableField("c_scope")
    private String scope;
    /**邮箱*/
    @Pattern(regexp = "\\w{3,}@\\w{2}[.](com|cn|net)",message = "邮件格式为XX@XX.com")
    @ApiModelProperty(value = "邮箱")
    @TableField("c_email")
    private String  email;

    public CustomerBean() {
    }

    public CustomerBean(String customerName, String headName, String headPhone, String address, String scope, String email) {
        this.customerName = customerName;
        this.headName = headName;
        this.headPhone = headPhone;
        this.address = address;
        this.scope = scope;
        this.email = email;
    }

    public Integer getCustomerId() {
        return customerId;
    }

    public void setCustomerId(Integer customerId) {
        this.customerId = customerId;
    }

    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    public String getHeadName() {
        return headName;
    }

    public void setHeadName(String headName) {
        this.headName = headName;
    }

    public String getHeadPhone() {
        return headPhone;
    }

    public void setHeadPhone(String headPhone) {
        this.headPhone = headPhone;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getScope() {
        return scope;
    }

    public void setScope(String scope) {
        this.scope = scope;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    @Override
    public String toString() {
        return "CustomerBean{" +
                "customerId=" + customerId +
                ", customerName='" + customerName + '\'' +
                ", headName='" + headName + '\'' +
                ", headPhone='" + headPhone + '\'' +
                ", address='" + address + '\'' +
                ", scope='" + scope + '\'' +
                ", email='" + email + '\'' +
                "}\n";
    }
}
